########################################################################## # Check if a model is open, and that it is the correct type ########################################################################## CC "Modeling" GET_ACT_MODEL SET nModelID:(modelid) IF (nModelID = -1) { CC "AdoScript" ERRORBOX "Error: No model currently open" EXIT } CC "Core" GET_MODEL_MODELTYPE modelid:(nModelID) SET sModelType:(modeltype) IF (sModelType != "Business Process Diagram") { CC "AdoScript" ERRORBOX "Error: Current model is not the correct modeltype \n Requires modeltype: Business Process Diagram" EXIT } CC "Core" GET_ATTR_VAL objid:(nModelID) attrname:"BAR Display active" SET sDisplayActive:(val) IF (sDisplayActive = "No") { CC "Core" SET_ATTR_VAL objid:(nModelID) attrname:"BAR Display active" val:"Yes" } ELSE { CC "Core" SET_ATTR_VAL objid:(nModelID) attrname:"BAR Display active" val:"No" }